import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2023-03-10
 * Time: 17:10
 */
//io流异常处理
public class FileTest {
    public static void main(String[] args)  {
        File file=new File("hello.txt");
        System.out.println(file.exists());
        try {
            if(!file.exists()){
                boolean  flag=file.createNewFile();
                System.out.println(file.exists());

            }
            System.out.println(file.length());
        }catch(IOException  e){
            System.out.println(e);
        }

    }
}
